﻿using QLBH.DTO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace QLBH.DAO
{
    class DAO_NhanVien
    {
        public DAO_NhanVien()
        {
            Connection_Sql.StartConnect();
        }
        public int Insert(NhanVien nv,Phong p)
        {
            IDictionary<string, string> d = new Dictionary<string, string>();
            d.Add("@ma_nv", nv.Ma_nv);
            d.Add("@ten_nv", nv.Ten_nv);
            d.Add("@chucvu", nv.Chucvu);
            d.Add("@ma_phong", p.Maphong);
            d.Add("@truongphong", nv.Truongphong);
            String spInsert = "insert_Nhanvien";
           return Connection_Sql.Insert(spInsert, d, true);
        }
    }
}
